package com.jinshan.gaietymall.controller;

import com.jinshan.gaietymall.utils.BaseResponseResult;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

/**
 * @author liujinshan
 * @title: LoginController
 * @projectName gaietymall
 * @description: TODO 后他管理系统登录接口
 * @date 2020/4/21 19:07
 */
@RestController
@RequestMapping("/admin")
//解决跨域
@CrossOrigin
public class LoginController {


    @PostMapping("/login")
    public BaseResponseResult login(){

        return BaseResponseResult.ok();
    }

    @GetMapping("/info")
    public Map<String,Object> getInfo(){
        Map<String,Object> map = new HashMap<>();
        map.put("roles","[admin]");
        map.put("name","admin");
        map.put("avatar","https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif");
        return map;
    }

}
